
cmake_minimum_required(VERSION 3.3 FATAL_ERROR)

project(CylinderExample)

set(VTK_DIR "/Users/dai/Qt/5.15.2/clang_64/lib/cmake/Qt5/lib/cmake/vtk-9.0")

#set(CMAKE_PREFIX_PATH "/Users/dai/Qt/5.15.2/clang_64/lib/cmake")
#set(VTK_DIR "/Users/dai/Qt/5.15.2/clang_64/lib/cmake/Qt5/lib")
#set(VTK_DIR "/Users/dai/Qt/5.15.2/clang_64/lib/cmake/Qt5/lib")

find_package(VTK COMPONENTS 
  vtkCommonColor
  vtkCommonCore
  vtkFiltersSources
  vtkInteractionStyle
  vtkRenderingContextOpenGL2
  vtkRenderingCore
  vtkRenderingFreeType
  vtkRenderingGL2PSOpenGL2
  vtkRenderingOpenGL2
  QUIET
)

if (NOT VTK_FOUND)
    message("==> Skipping example: ${VTK_NOT_FOUND_MESSAGE}")
    return ()
endif ()

set(Srcs CylinderExample.cxx)

add_executable(CylinderExample
        ${Srcs})
target_link_libraries(CylinderExample
        PRIVATE
        ${VTK_LIBRARIES}
        )
vtk_module_autoinit(
        TARGETS CylinderExample
        MODULES ${VTK_LIBRARIES}
)
